from const import *

import subprocess

for folder in folders:
    print(f'Try route {folder}')
    out = open(log_file_template.format(folder), 'w')
    subprocess.call(
        [
            'cargo', 
            'run', 
            '--bin', 
            'connect', 
            controlbits_folder_template.format(folder),
            output_folder_template.format(folder),
        ], 
        stdout=out,
        stderr=out,
    )